﻿@inherits AdminCompontentBase

<div class="full-height flex-column">
    <MCard Class="flex-height-auto d-flex flex-column justify-center align-center">
        <div class="grid">
            <div class="item">
                <MHover>
                    <MCard @attributes="context.Attrs" Class="@($"d-flex flex-column justify-center align-center {(context.Hover ? "primary" : "fill-background")}")"
                           OnClick="_ordinaryCreateModal.OpenModalAsync">
                        <SIcon Size="context.Hover?54:36" Color="@(context.Hover?"fill":"emphasis2")">mdi-email</SIcon>
                        <div class="h6 @(context.Hover?"pt-10 fill--text":"pt-12 regular--text")">@T("DisplayName.MessageEntityType.Ordinary")</div>
                    </MCard>
                </MHover>
            </div>
            <div class="item">
                <MHover>
                    <MCard @attributes="context.Attrs" Class="@($"d-flex flex-column justify-center align-center {(context.Hover ? "primary" : "fill-background")}")"
                           OnClick="_templateCreateModal.OpenModalAsync">
                        <SIcon Size="context.Hover?54:36" Color="@(context.Hover?"fill":"emphasis2")">mdi-collage</SIcon>
                        <div class="h6 @(context.Hover?"pt-10 fill--text":"pt-12 regular--text")">@T("DisplayName.MessageEntityType.Template")</div>
                    </MCard>
                </MHover>
            </div>
        </div>
    </MCard>

    <div class="mt-6 fill rounded-2 d-flex justify-center align-center px-6 py-3" style="height:56px">
        <SButton Ripple=false Plain IsActive Color="emphasis2" Class="h8" OnClick="NavigateToList"><MIcon Size="20" Left>fas fa-tasks</MIcon>@T("DisplayName.MessageTaskList")</SButton>
    </div>
</div>

<OrdinaryMessageCreateModal @ref="_ordinaryCreateModal" />
<TemplateMessageCreateModal @ref="_templateCreateModal" />